package com.dx.architectureddd.common.event;

import cn.hutool.core.util.IdUtil;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 领域事件
 *
 * @author xin.deng
 * @date 2023/09/24
 */
@Getter
public abstract class DomainEvent<T> extends ApplicationEvent {

    private final String id;

    public DomainEvent(T t) {
        super(t);
        this.id = IdUtil.simpleUUID();
    }
}
